from pygal.maps.world import COUNTRIES # pygal-2.0.0

def get_country_code(county_name):
	"""根据指定国家，返回pygal使用的两个字母国别码"""
	for code,name in COUNTRIES.items():
		if name==county_name:
			return code
	return None

print(get_country_code('Caribbean small states'))
print(get_country_code('China'))

